package edu.core.testapp.client;

import java.io.IOException;
import java.io.UnsupportedEncodingException;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import edu.core.testapp.shared.RSAKeysString;
import edu.core.testapp.shared.RSAKeysString.RSACLoseKeyString;
import edu.core.testapp.shared.RSAKeysString.RSAOpenKeyString;

@RemoteServiceRelativePath("protect2")
public interface Protect02Service extends RemoteService {
	
	public String[] getnerateKeys();
	public RSAKeysString generateKeys();
	public String encodeString(String msg, RSAOpenKeyString open) throws IOException;
	public String decodeString(String code, RSAOpenKeyString open, RSACLoseKeyString close) throws IOException;
	public String stringToBase64(String string) throws UnsupportedEncodingException;
	public String base64ToString(String base64) throws UnsupportedEncodingException;
	public String encodeBase64(String msg, RSAOpenKeyString open) throws IOException;
	public String decodeBase64(String code, RSAOpenKeyString open, RSACLoseKeyString close) throws IOException;
}
